package com.dailyblue.java.cloud.emp.controller;

import com.dailyblue.java.cloud.commons.util.JsonResult;
import com.dailyblue.java.cloud.emp.service.EmpService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/emp")
public class EmpController {
    @Resource
    private EmpService empService;

    @GetMapping("/{page}/{size}")
    public JsonResult find(@PathVariable("page") int page, @PathVariable("size") int size) {
        return empService.find(page, size);
    }
}
